Texture2D g_txDiffuse1  : register (t0);
SamplerState sample0	: register (s0);

//--------------------------------------------------------------------------------------
// Constant Buffer Variables
//--------------------------------------------------------------------------------------
matrix World;
matrix View;
matrix Projection;

//--------------------------------------------------------------------------------------
struct VS_OUTPUT
{
    float4 p : SV_POSITION;
    float4 c : COLOR0;
	float2 t : TEXCOORD;
};

//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
VS_OUTPUT VS( float4 p : POSITION, float4 c : COLOR, float2 t : TEXCOORD0 )
{
    VS_OUTPUT output = (VS_OUTPUT)0;
    output.p = mul( p, World );
    output.p = mul( output.p, View );
    output.p = mul( output.p, Projection );
    output.c = c;
	output.t = t;
    return output;
}


//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------
float4 PS( VS_OUTPUT input ) : SV_Target
{
	float4 txColor0 =  g_txDiffuse1.Sample( sample0, input.t );
	return txColor0;
    //return input.c;
}

//--------------------------------------------------------------------------------------
technique11 Render
{
    pass P0
    {
		SetVertexShader( CompileShader( vs_4_0, VS() ) );
        SetGeometryShader( NULL );
        SetPixelShader( CompileShader( ps_4_0, PS() ) );
    }
}

float4 main( float4 pos : POSITION ) : SV_POSITION
{
	return pos;
}